<template>
    <h3>我是组件a</h3>
</template>
<script setup>
import Mitt from './mitt'
import { onUnmounted } from 'vue'
const someMethed = () => { console.log('我是组件a') }
Mitt.on('handleChange',someMethed) //发送
onUnmounted(()=>{
    Mitt.off('handleChange',someMethed)
})
</script>